package com.hzlx.finishedGoods.feign.fallback;


import com.hzlx.MesBadGoodsDto;
import com.hzlx.ProductionProductsDto;
import com.hzlx.ResultDto;
import com.hzlx.finishedGoods.feign.ProductionService;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class productionServiceFallbackFactory implements FallbackFactory<ProductionService> {
    @Override
    public ProductionService create(Throwable cause) {
        return new ProductionService(){
            @Override
            public ResultDto<String> updateByProductIdByFinished(ProductionProductsDto productionProducts) {

                return  ResultDto.<String>builder().msg("远程调用删除次品失败"+cause.getMessage()).build();
            }
        };
    }
}
